﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 车辆图片表基础输入参数
/// </summary>
public class AppVehicleImageBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 车辆Id
    /// </summary>
    [Required(ErrorMessage = "车辆Id不能为空")]
    public virtual long? VehicleId { get; set; }
    
    /// <summary>
    /// 图片URL
    /// </summary>
    [Required(ErrorMessage = "图片URL不能为空")]
    public virtual long? ImageUrl { get; set; }
    
    /// <summary>
    /// 是否主图
    /// </summary>
    [Required(ErrorMessage = "是否主图不能为空")]
    public virtual bool? IsMain { get; set; }
    
    /// <summary>
    /// 排序
    /// </summary>
    [Required(ErrorMessage = "排序不能为空")]
    public virtual int? Sort { get; set; }
    
}

/// <summary>
/// 车辆图片表分页查询输入参数
/// </summary>
public class PageAppVehicleImageInput : BasePageInput
{
    /// <summary>
    /// 车辆Id
    /// </summary>
    public long? VehicleId { get; set; }
    
    /// <summary>
    /// 图片URL
    /// </summary>
    public long? ImageUrl { get; set; }
    
    /// <summary>
    /// 是否主图
    /// </summary>
    public bool? IsMain { get; set; }
    
    /// <summary>
    /// 排序
    /// </summary>
    public int? Sort { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 车辆图片表增加输入参数
/// </summary>
public class AddAppVehicleImageInput
{
    /// <summary>
    /// 车辆Id
    /// </summary>
    [Required(ErrorMessage = "车辆Id不能为空")]
    public long? VehicleId { get; set; }
    
    /// <summary>
    /// 图片URL
    /// </summary>
    [Required(ErrorMessage = "图片URL不能为空")]
    public long? ImageUrl { get; set; }
    
    /// <summary>
    /// 是否主图
    /// </summary>
    [Required(ErrorMessage = "是否主图不能为空")]
    public bool? IsMain { get; set; }
    
    /// <summary>
    /// 排序
    /// </summary>
    [Required(ErrorMessage = "排序不能为空")]
    public int? Sort { get; set; }
    
}

/// <summary>
/// 车辆图片表删除输入参数
/// </summary>
public class DeleteAppVehicleImageInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 车辆图片表更新输入参数
/// </summary>
public class UpdateAppVehicleImageInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 车辆Id
    /// </summary>    
    [Required(ErrorMessage = "车辆Id不能为空")]
    public long? VehicleId { get; set; }
    
    /// <summary>
    /// 图片URL
    /// </summary>    
    [Required(ErrorMessage = "图片URL不能为空")]
    public long? ImageUrl { get; set; }
    
    /// <summary>
    /// 是否主图
    /// </summary>    
    [Required(ErrorMessage = "是否主图不能为空")]
    public bool? IsMain { get; set; }
    
    /// <summary>
    /// 排序
    /// </summary>    
    [Required(ErrorMessage = "排序不能为空")]
    public int? Sort { get; set; }
    
}

/// <summary>
/// 车辆图片表主键查询输入参数
/// </summary>
public class QueryByIdAppVehicleImageInput : DeleteAppVehicleImageInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataAppVehicleImageInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 车辆图片表数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportAppVehicleImageInput : BaseImportInput
{
    /// <summary>
    /// 车辆Id 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? VehicleId { get; set; }
    
    /// <summary>
    /// 车辆Id 文本
    /// </summary>
    [ImporterHeader(Name = "*车辆Id")]
    [ExporterHeader("*车辆Id", Format = "", Width = 25, IsBold = true)]
    public string VehicleFkDisplayName { get; set; }
    
    /// <summary>
    /// 图片URL 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? ImageUrl { get; set; }
    
    /// <summary>
    /// 图片URL 文本
    /// </summary>
    [ImporterHeader(Name = "*图片URL")]
    [ExporterHeader("*图片URL", Format = "", Width = 25, IsBold = true)]
    public string ImageUrlFkDisplayName { get; set; }
    
    /// <summary>
    /// 是否主图
    /// </summary>
    [ImporterHeader(Name = "*是否主图")]
    [ExporterHeader("*是否主图", Format = "", Width = 25, IsBold = true)]
    public bool? IsMain { get; set; }
    
    /// <summary>
    /// 排序
    /// </summary>
    [ImporterHeader(Name = "*排序")]
    [ExporterHeader("*排序", Format = "", Width = 25, IsBold = true)]
    public int? Sort { get; set; }
    
}
